class Feed::AfterServiceCreated < Feed
  validates :order_item_id,
    :after_service_id,
    :presence => true

  belongs_to :after_service, :dependent => :destroy
    
  def code
    ActiveSupport::StringInquirer.new('after_serviced')
  end

  def short_desc
    desc = "#{after_service.installer_full_name}于#{after_service.after_serviced_on}<b>上门服务</b>【#{
    after_service.order_item.furniture_code}-#{after_service.order_item.furniture_name}】  责任方：#{after_service.liable_side}"
    return desc
  end

  def remark
    after_service.remark
  end

  def related_one
    after_service
  end
  
  def related_html_id
    "related_after_service_#{after_service.id}"
  end
  
  def related_type
    "related_after_service"
  end
end
